package org.lyh.course.doc;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.math.BigDecimal;
import java.util.Date;
@Document(indexName = "course")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class CourseDoc {
    @Id
    private Long id;
    @Field(type = FieldType.Text)
    private String name;
    @Field(type = FieldType.Text)
    private String forUser;
    @Field(type = FieldType.Long)
    private Long courseTypeId;
    @Field(type = FieldType.Text)
    private String gradeName;
    @Field(type = FieldType.Long)
    private Long gradeId;
    @Field(type = FieldType.Integer)
    private Integer status;
    @Field(type = FieldType.Long)
    private Long loginId;
    @Field(type = FieldType.Text)
    private String loginUserName;
    @Field(type = FieldType.Date)
    private Date startTime;
    @Field(type = FieldType.Date)
    private Date endTime;
    @Field(type = FieldType.Keyword)
    private String pic;
    @Field(type = FieldType.Integer)
    private Integer totalMinute;
    @Field(type = FieldType.Date)
    private Date onlineTime;
    @Field(type = FieldType.Integer)
    private Integer chapterCount;
    @Field(type = FieldType.Text)
    private String teacherNames;
    @Field(type = FieldType.Text)
    private String intro;
    @Field(type = FieldType.Text)
    private String description;
    @Field(type = FieldType.Double)
    private BigDecimal price;
    @Field(type = FieldType.Text)
    private String typeName;
    @Field(type = FieldType.Integer)
    private Integer saleCount;
    @Field(type = FieldType.Integer)
    private Integer viewCount;
    @Field(type = FieldType.Integer)
    private Integer commentCount;
    @Field(type = FieldType.Integer)
    private Integer charge;
}
